import axios from 'axios';

/**
 * 拍照
 * @returns
 */
export async function take_pictures_api() {
  const dataGaopaiyi = {
    filepath: 'base64',
    rotate: '0',
    deskew: '1',
    bAutoAdjust: '1',
    cutpage: '1',
    camidx: '0',
    ColorMode: '0',
    quality: '3',
  };
  return axios.post<any>('http://127.0.0.1:38088/video=grabimage', JSON.stringify(dataGaopaiyi));
}

/**
 * 扫条码
 * @returns
 */
export async function take_scancode_api() {
  const dataGaopaiyi = {
    time: '20',
  };
  return axios.post<any>('http://127.0.0.1:38088/barcode=get', JSON.stringify(dataGaopaiyi));
}
